<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="../resources/common.js"></script>
<script src="../resources/picker-common.js"></script>
<script src="../calendar-picker/resources/calendar-picker-common.js"></script>
</head>
<body style="zoom:1.25;">
<p id="description"></p>
<div id="console"></div>

<input type="date" id="date">

<script>
description('Test for hideWindow() function in page-popups.');

openPicker(document.getElementById('date'), test);

function test() {
    popupWindow.addEventListener('didHide', function() {
        testPassed('didHide event was dispatched.');
        finishJSTest();
    }, false);
    popupWindow.hideWindow();

    setTimeout(function() {
        testFailed('didHide event was not dispatched.');
        finishJSTest();
    }, 5000);
}

</script>
</body>
</html>
